package com.gzhryc.log.dao.db;

import java.util.Date;

import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.log.enums.HttpLogEnum;
import com.gzhryc.log.models.IHttpRequestInfo;

@Table(name = "log_manager_visit_record")
public class ManagerVisitRecord implements IHttpRequestInfo {

	@Id
	protected Long id;

	@Column(name = "manager_id")
	protected Long managerId;

	@Column(name = "manager_name")
	protected String managerName;

	@Column(length = 255)
	protected String note; // 访问描述

	@Column(name = "context_path")
	protected String contextPath;

	@Column(length = 255)
	protected String path; // 访问链接

	@Column(name = "query_string", length = 1024, note = "路径查询字符串")
	protected String queryString;

	@Column(name = "form_json", type = "text", note = "form表单中数据")
	protected String formJson;

	@Column
	protected String method; // 访问方式

	@Column
	protected String lang; // 语言

	@Column
	protected String scheme; // 域名

	@Column
	protected String ip; // 访问IP

	@Column(name = "is_xml_http_request")
	protected Boolean isXmlHttpRequest; // 是否是XmlHttp访问

	@Column(length = 1024)
	protected String accept; // 访问内容类型

	@Column(name = "user_agent", length = 1024)
	protected String userAgent; // 访问代理信息

	@Column(name = "visit_software_name")
	protected String visitSoftwareName; // 访问的工具名称

	@Column(name = "client_type", length = 4)
	protected Integer clientType; // 客户端类型

	@Column(type = "text")
	protected String referer;

	@Column(name = "create_date")
	protected Date createDate;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getManagerId() {
		return managerId;
	}

	public void setManagerId(Long managerId) {
		this.managerId = managerId;
	}

	public String getManagerName() {
		return managerName;
	}

	public void setManagerName(String managerName) {
		this.managerName = managerName;
	}

	public String getContextPath() {
		return contextPath;
	}

	public void setContextPath(String contextPath) {
		this.contextPath = contextPath;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public String getQueryString() {
		return queryString;
	}

	public void setQueryString(String queryString) {
		this.queryString = queryString;
	}

	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	public String getLang() {
		return lang;
	}

	public void setLang(String lang) {
		this.lang = lang;
	}

	public String getScheme() {
		return scheme;
	}

	public void setScheme(String scheme) {
		this.scheme = scheme;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public Boolean getIsXmlHttpRequest() {
		return isXmlHttpRequest;
	}

	public void setIsXmlHttpRequest(Boolean isXmlHttpRequest) {
		this.isXmlHttpRequest = isXmlHttpRequest;
	}

	public String getAccept() {
		return accept;
	}

	public void setAccept(String accept) {
		this.accept = accept;
	}

	public String getUserAgent() {
		return userAgent;
	}

	public void setUserAgent(String userAgent) {
		this.userAgent = userAgent;
	}

	public String getVisitSoftwareName() {
		return visitSoftwareName;
	}

	public void setVisitSoftwareName(String visitSoftwareName) {
		this.visitSoftwareName = visitSoftwareName;
	}

	public Integer getClientType() {
		return clientType;
	}

	public void setClientType(Integer clientType) {
		this.clientType = clientType;
	}

	public String getReferer() {
		return referer;
	}

	public void setReferer(String referer) {
		this.referer = referer;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public String getFormJson() {
		return formJson;
	}

	public void setFormJson(String formJson) {
		this.formJson = formJson;
	}

	public String getClientTypeName() {
		return HttpLogEnum.ClientType.note(this.clientType);
	}

}
